<%@ page language="java" import="com.demo.util.Conn,java.sql.ResultSet" pageEncoding="UTF-8"%>
<%
String strLonin = request.getParameter("login");
String strPassword = request.getParameter("pwd");
String strUserName = request.getParameter("username");
String strEmail = request.getParameter("email");
String strContactPhone = request.getParameter("contact_phone");
String strPostCode = request.getParameter("postcode");
String strAddress = request.getParameter("address");

String sql = "insert into dbf_admin_user(login,password,name,address,postcode,contact_phone,email) values ('";
sql += strLonin + "','" + strPassword + "','" + strUserName + "','" + strAddress + "','" + strPostCode + "','"+ strContactPhone + "','"+ strEmail + "')";

Conn conn = new Conn();
boolean result = conn.execute(sql);
if (result == true){
	response.sendRedirect("result.jsp?msg=add_AdminUser_success&page=administrator.jsp");
}
else{
	response.sendRedirect("result.jsp?msg=add_admin_user_faile&page=administrator.jsp");
}
%>

